<table class="formTable">
<tbody>
{assign var=key value='price'}
<tr>
	<th>価格</th>
	<td>
		<input type="text" name="forms[{$key}]" value="{$forms[$key]}" maxlength="10" /> 円
		{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='access'}
<tr>
	<th>交通</th>
	<td>
		<textarea name="forms[access]" class="">{$forms.access}</textarea>
	</td>
</tr>
<tr>
	<th>沿線駅名（一覧表示用）</th>
	<td>
		<table>
		<tbody>
		{assign var=key value='rail_name'}
		<tr>
			<th>沿線名</th>
			<td>
				<input type="text" name="forms[rail_name]" value="{$forms.rail_name}" maxlength="255" />
			</td>
		</tr>
		{assign var=key value='station_name'}
		<tr>
			<th>駅名</th>
			<td>
				<input type="text" name="forms[station_name]" value="{$forms.station_name}" maxlength="255 "/>
			</td>
		</tr>
		{assign var=key value='walk_time'}
		<tr>
			<th>徒歩</th>
			<td>
				<input type="text" name="forms[walk_time]" value="{$forms.walk_time}" class="smartspinner" maxlength="255" />分
                {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
			</td>
		</tr>
		</tbody>
		</table>
	</td>
</tr>
<tr>
	<th>住所</th>
	<td>
		<table>
		<tbody>
		{assign var=key value='zipcode'}
		<tr>
			<th>郵便番号</th>
			<td class="floats">
				<span>
				<input type="text" name="forms[zipcode1]" class="short" value="{$forms.zipcode1}" maxlength="3" />
				-
				<input type="text" name="forms[zipcode2]" class="short" value="{$forms.zipcode2}" maxlength="4" />
				</span>
				<p class="btn_blank search_addr float-left" style="margin-top:3px;">
				<a href="javascript:;" onClick="AjaxZip3.zip2addr( 'forms[zipcode1]', 'forms[zipcode2]', 'forms[prefecture_code]', 'forms[address]', 'dummy', 'address' );">検索</a>
				</p>
			</td>
		</tr>
		{assign var=key value='prefecture_code'}
		<tr>
			<th>都道府県</th>
			<td>
				<select name="forms[prefecture_code]">
					<option value="">選択してください</option>
					{html_options options=$estate_sale->getPrefectureMap() selected=$forms.prefecture_code}
				</select>
			</td>
			</tr>
			{assign var=key value='address'}
			<tr>
				<th>市区町村以降</th>
				<td>
					<input type="text" name="forms[address]" id="address" class="text" value="{$forms.address}" />
				</td>
		</tr>
		</tbody>
		</table>
	</td>
</tr>
{assign var=key value='map'}
<tr>
	<th>マップ</th>
	<td >
		<span id="status_on" class="float-left {if $forms.lat == ''}display-none{/if}" style="margin:3px 10px 0 0;"><a href="javascript:;" class="delete_mini">×</a>設定済</span>
		<span id="status_off" class="float-left {if $forms.lat != ''}display-none{/if}" style="margin:3px 10px 0 0;">未設定</span>
		<p class="btn_blank float-left">
			<a href="javascript:;" id="setMap">マップ設定</a>
		</p>
		<input type="hidden" id="lat" name="forms[lat]" value="{$forms.lat}" />
		<input type="hidden" id="lng" name="forms[lng]" value="{$forms.lng}" />
	</td>
</tr>
{assign var=key value='income'}
<tr>
	<th>年間収入</th>
	<td>
		<input type="text" name="forms[income]" value="{$forms.income}" maxlength="10" /> 円
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='interest'}
<tr>
	<th>満室時利回り</th>
	<td>
		<input type="text" name="forms[interest]" value="{$forms.interest}" maxlength="10" /> %
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='unit_price'}
<tr>
	<th>1m<sup>2</sup>単価</th>
	<td>
		<input type="text" name="forms[unit_price]" value="{$forms.unit_price}" maxlength="10" /> 円
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='land_area'}
<tr>
	<th>土地面積</th>
	<td>
		<input type="text" class="short" name="forms[land_area]" value="{$forms.land_area}" maxlength="10" /> m<sup>2</sup>
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='building_area'}
<tr>
	<th>建物面積</th>
	<td>
		<input type="text" class="short" name="forms[building_area]" value="{$forms.building_area}" maxlength="10" /> m<sup>2</sup>
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='plan'}
<tr>
	<th>間取</th>
	<td>
		<select name="forms[plan]">
		<option value="">選択してください</option>
		{html_options options=$estate_sale->getPlanMap() selected=$forms.plan}
		</select>
</td>
</tr>
{assign var=key value='numbers'}
<tr>
	<th>棟総戸数</th>
	<td>
		<input type="text" class="smartspinner" name="forms[numbers]" value="{$forms.numbers}" maxlength="5" />
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='stories'}
<tr>
	<th>階数</th>
	<td class="floats">
		<span><input type="text" class="smartspinner" name="forms[stories]" value="{$forms.stories}" maxlength="3" /> 階建</span>
		<span class="part" style="position:relative;left:5px;{if $forms.class_id != 1}display:none;{/if}"><input type="text" class="smartspinner" name="forms[floor]" value="{$forms.floor}" maxlength="3"/> 階</span>
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='management_cost'}
<tr class="part" {if $forms.class_id != 1}style="display:none;"{/if}>
	<th>管理費</th>
	<td>
		<input type="text" class="short" name="forms[management_cost]" value="{$forms.management_cost}" maxlength="10" /><span>円</span>
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='repairs_cost'}
<tr class="part" {if $forms.class_id != 1}style="display:none;"{/if}>
	<th>修繕積立金</th>
	<td>
		<input type="text" class="short" name="forms[repairs_cost]" value="{$forms.repairs_cost}" maxlength="10" /><span>円</span>
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='right_id'}
<tr>
	<th>土地権利</th>
	<td class="floats">
		<select name="forms[right_id]">
		<option value="">選択してください</option>
		{html_options options=$estate_sale->getRightMap() selected=$forms.right_id}
		</select>
	</td>
</tr>
{assign var=key value='rent'}
<tr>
	<th>借地料</th>
	<td>
		<input type="text" class="short" name="forms[rent]" value="{$forms.rent}" maxlength="10" /> 円
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='land_category_id'}
<tr>
	<th>地目</th>
	<td class="floats">
		<select name="forms[land_category_id]">
		<option value="">選択してください</option>
		{html_options options=$estate_sale->getLandCategoryMap() selected=$forms.land_category_id}
		</select>
	</td>
</tr>
{assign var=key value='district'}
<tr>
	<th>用途地域</th>
	<td>
		<input type="text" name="forms[district]" value="{$forms.district}" maxlength="255" />
	</td>
</tr>
{assign var=key value='building_land_ratio'}
<tr>
	<th>建ぺい率</th>
	<td>
		<input type="text" class="smartspinner" name="forms[building_land_ratio]" value="{$forms.building_land_ratio}" maxlength="10" />%
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
<tr>
	<th>容積率</th>
	<td>
		<input type="text" class="smartspinner" name="forms[floor_area_ratio]" value="{$forms.floor_area_ratio}" maxlength="10" />%
        {if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
{assign var=key value='structure_id'}
<tr>
	<th>建物構造</th>
	<td class="floats">
		<select name="forms[structure_id]">
		<option value="">選択してください</option>
		{html_options options=$estate_sale->getStructureMap() selected=$forms.structure_id}
		</select>
	</td>
</tr>
{assign var=key value='years'}
<tr>
	<th>築年月</th>
	<td class="floats">
		<input type="text" class="smartspinner" name="forms[years_y]" value="{$forms.years_y}" /> <span>年</span>
		<input type="text" class="smartspinner spin_month" name="forms[years_m]" value="{$forms.years_m}" /> <span>月</span>
	</td>
</tr>
{assign var=key value='park_flag'}
<tr>
	<th>駐車場</th>
	<td class="floats">
		<label><input type="radio" name="forms[park_flag]" value="1" {if $forms.park_flag == 1}checked{/if}/> 有</label>
        <label><input type="radio" name="forms[park_flag]" value="0" {if $forms.park_flag == 0 or $forms.park_flag == ''}checked{/if}/> 無</label>
	</td>
</tr>
{assign var=key value='connection_road'}
<tr>
	<th>接道</th>
	<td>
		<input type="text" name="forms[connection_road]" value="{$forms.connection_road}" maxlength="255" />
	</td>
</tr>
{assign var=key value='state_id'}
<tr>
	<th>現況</th>
	<td class="floats">
		<select name="forms[state_id]">
			<option value="">選択してください</option>
			{html_options options=$estate_sale->getStateMap() selected=$forms.state_id}
		</select>
	</td>
</tr>
{assign var=key value='transfer'}
<tr>
	<th>引渡時期</th>
	<td>
		<input type="text" name="forms[transfer]" value="{$forms.transfer}" maxlength="255" />
	</td>
</tr>
{assign var=key value='direction'}
<tr>
	<th>向き</th>
	<td>
		<input type="text" name="forms[direction]" value="{$forms.direction}" maxlength="255" />
	</td>
</tr>
{assign var=key value='facilities'}
<tr>
	<th>設備</th>
	<td>
		<textarea name="forms[facilities]" class="">{$forms.facilities}</textarea>
	</td>
</tr>
{assign var=key value='feature1'}
<tr>
	<th>特色1</th>
	<td>
		<input type="text" name="forms[feature1]" value="{$forms.feature1}" style="width:95%;" maxlength="512" /><br />
		※一覧画面で表示するテキストです。60文字を超える場合「…」に省略されます。
	</td>
</tr>
{assign var=key value='feature2'}
<tr>
	<th>特色2</th>
	<td>
		<textarea name="forms[feature2]" class="mce_edit">{$forms.feature2}</textarea>
	</td>
</tr>
<tr>
	<th>詳細（画像、コメント）</th>
	<td class="photos">
		<a name="pic"></a>
		{if isset($forms.img[3])}
			{image_uploader name='forms[img][3][]' value=$forms.img[3] comment='forms[img_comment][3][]' comment_value=$forms.img_comment[3] remove=true}
		{else}
			{image_uploader name='forms[img][3][]' comment='forms[img_comment][3][]' remove=true}
		{/if}
		<p class="clear">
		<input type="button" name="add_image" value="画像枠を追加" onClick="estate_sale_add_image();"/>
		<script type="text/javascript">
		function estate_sale_add_image()
		{
			$.ajax({
				  url: '{$smarty.server.SCRIPT_NAME}?do=add_image_box',
				  success: function(data) {
					  $('input[name=add_image]').parent('p').before(data);
					  uploader_init();
				  }
			});
		}
		</script>
		</p>
	</td>
</tr>
{assign var=key value='note'}
<tr>
	<th>備考（非公開）</th>
	<td>
		<textarea name="forms[note]" class="">{$forms.note}</textarea>
	</td>
</tr>
</tbody>
</table>